<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>

    <h1>判断星期</h1>
    今天星期数字是{{$week}} <br>
    @if($week == 1)
        星期一
    @elseif($week == 2)
        星期二
    @elseif($week == 3)
        星期三
    @elseif($week == 4)
        星期四
    @elseif($week == 5)
        星期五
    @elseif($week == 6)
        星期六
    @else
        星期日
    @endif


    <h2>循环数据</h2>
    @foreach($data as $k=>$v)
        {{$v->id}} - {{$v->name}} - {{$v->age}} - {{$v->email}} <br>
    @endforeach


</body>
</html>